{
  "properties" : { },
  "id" : "1a69350a96ee4e1cbd2c1787d67dcbf9",
  "script" : null,
  "groupId" : "b6112dd1a5fc4f9f98d1a3435a834c9b",
  "name" : "删除",
  "createTime" : 1714063372175,
  "updateTime" : 1711902677993,
  "lock" : null,
  "createBy" : "管理员",
  "updateBy" : "管理员",
  "path" : "remove",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ {
    "name" : "permission",
    "value" : "system:jsgl",
    "description" : "允许拥有该权限的访问",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "requestBody" : "{\r\n    \"ids\": [1001]\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : null,
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : null
}
================================
import com.gitee.fastmybatis.core.query.Query;

import 'com.wiwf.model.mapper.admin.dao.SysRoleMapper' as sysRoleMapper;
import 'com.wiwf.model.mapper.admin.dao.SysRoleMenuMapper' as sysRoleMenuMapper;

import '@/system/dict/isNotDelRole' as isNotDelRole;

for (id in body.ids) {
    if(isNotDelRole(id.asString())){
        exit 409, "不能该角色！被系统字典限制";
    }
}

Query query = new Query().in("role_id",body.ids);
sysRoleMenuMapper.deleteByQuery(query, null);

return sysRoleMapper.deleteByIds(body.ids, null);